// 需要权限访问的完整路由表
// 获取权限后和该表匹配的则被加入到正式路由中。该表必须完整的包含工程页面
// path 页面跳转地址
// permission字段内容从后台获取，代表该页内部详细权限，以key:value形式存储

const asyncRouter = [{
        path: '/asyncRouter',
        component: r => require.ensure([], () => r(require('../page/layout/layout')), 'layout'),
        children: []
    },
    {
        path: '/i18n',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/i18n/i18n')), 'i18n'),
    },
    /**
     * 自建view层
     */
    // assess
    {
        path: '/assess/scoreList',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/assess/scoreList')), 'assess'),
    },
    {
        path: '/assess/scoreDetail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/assess/scoreDetail')), 'assess'),
    },
    {
        path: '/assess/score_month',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/assess/score_month')), 'assess'),
    },
    {
        path: '/assess/score_year',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/assess/score_year')), 'assess'),
    },
    // work
    {
        path: '/work/normalList',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/normalList')), 'work'),
    },
    {
        path: '/work/normalNew',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/normalNew')), 'work'),
    },
    {
        path: '/work/normalAdd',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/normalAdd')), 'work'),
    },
    {
        path: '/work/normalEdit',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/normalEdit')), 'work'),
    },
    {
        path: '/work/normalDetail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/normalDetail')), 'work'),
    },
    {
        path: '/work/auditList',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/auditList')), 'work'),
    },
    {
        path: '/work/auditDetail',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/auditDetail')), 'work'),
    },
    {
        path: '/work/workTime_own',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/workTime_own')), 'work'),
    },
    {
        path: '/work/workTime_sum',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/work/workTime_sum')), 'work'),
    },
    // item
    {
        path: '/item',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/item/list')), 'item'),
    },
    // data
    {
        path: '/data/overTime_sum',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/data/overTime_sum')), 'data'),
    },
    // ueditor
    {
        path: '/editor',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/editor/editor')), 'editor'),
    },
    //system
    {
        path: '/system/user',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/system/user')), 'system'),
    },
    {
        path: '/system/branch',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/system/branch')), 'system'),
    },
    {
        path: '/system/role',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/system/role')), 'system'),
    },
    {
        path: '/system/group',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/system/group')), 'system'),
    },
    {
        path: '/system/log',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/system/log')), 'system'),
    },
    //theme
    {
        path: '/theme',
        meta: {
            permission: []
        },
        component: r => require.ensure([], () => r(require('../page/themeChange/themeChange')), 'theme'),
    }
]

export default asyncRouter